package com.example.server.web.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author 作者
 * @since 2023-04-04
 */
@Getter
@Setter
@ApiModel(value = "Class对象", description = "")
public class Class implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("班级id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "年级",required = true)
    @NotNull(message = "年级不能为空")
    private String grade;

    @ApiModelProperty(value = "学院id",required = true)
    @NotNull(message = "学院id不能为空")
    private Long academyId;

    @ApiModelProperty(value = "专业id",required = true)
    @NotNull(message = "专业id不能为空")
    private Long majorId;

    @ApiModelProperty(value = "班级名称",required = true)
    @NotBlank(message = "班级名称不能为空")
    private String className;

    @ApiModelProperty("班级人数")
    private int classPersonNum;

}
